<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生选课界面</title>
</head>
<body>
<h2>学生选课信息</h2>
<table border="1" cellspacing="2" width="800" bgcolor="#faebd7">
    <tr>
        <th>序号</th>
        <th>学生名</th>
        <th>课程名</th>
        <th>成绩</th>
        <th>操作</th>
    </tr>
    <%--varStatus:标识状态，id一般不写，自动动态的生成,status(index,count)--%>
    <c:forEach items="${studentCourses}" var="StudentCourse">
        <tr align="center">
            <td>${StudentCourse.id}</td>
            <td>${StudentCourse.stuName}</td>
            <td>${StudentCourse.courseName}</td>
            <td>${StudentCourse.score}</td>
            <td><a href="#">修改
            </a> <a href="#">删除</a></td>
        </tr>
    </c:forEach>
</table>
<hr>
<input type="button" size="100px" value="回到首页" id="index">
<script>
    document.getElementById("index").onclick=function () {
        location.href="/student/getAll";
    }
</script>

</body>
</html>
